]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 2/2] lib-sieve: actions - Create fileinto mailbox without the autocreate flag
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 11 Jun 2026 19:33:23 +0000 (19:33 +0000)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commitd11dfdbb86e8d7d3ece6a6c16644057cad36c416
tree081da632405cac790a4493e6ab97994676ddf913
parent76995ab1630508d91995b8661999b4b46e5d362c
[PATCH 2/2] lib-sieve: actions - Create fileinto mailbox without the autocreate flag

Stop setting MAILBOX_FLAG_AUTO_CREATE/SUBSCRIBE in act_store. Instead, on
mailbox_open() returning MAIL_ERROR_NOTFOUND, create the mailbox explicitly
with sieve_act_store_create_mailbox() when autocreation is enabled (the
:create side effect already creates it explicitly).

This makes the creation go through the normal ACL CREATE gate, so a fileinto
(with lda_mailbox_autocreate=yes) or fileinto :create can no longer create a
mailbox in a shared or public namespace that the user lacks the CREATE right
for.

A permission failure to create the mailbox is classified by
sieve_act_store_create_error_status(): for a user's personal script it is a
permanent failure (implicit keep), while for a global (administrator-defined)
script it is deferred (temporary failure), so the administrator notices the
script is behaving in a way they did not intend.

Gbp-Pq: Name 0002-lib-sieve-actions-Create-fileinto-mailbox-without-th.patch
pigeonhole/src/lib-sieve/sieve-actions.c
pigeonhole/src/lib-sieve/sieve-actions.h